ateom: avoid unix socket path length limits#100
ateom: avoid unix socket path length limits#100Benjamin Elder (BenTheElder) wants to merge 1 commit into
Conversation
89fc180 to
c7dc167
Compare
|
Skim — hash-with-debug-symlink approach is clean; the 12-char budget derivation in the comment is exactly what I'd want when re-reading this in 6 months. One observation worth raising before this lands:
Q: is |
c7dc167 to
8492c99
Compare
Agreed. Done. This is a host mount, which you can discover from the install manifests. |
|
Confirmed via
Your |
|
Technically we could also solve this with Chdir and using a short relative path but I went with this approach because we'd have to be careful to lock to an OS thread without CLONE_FS and isolate it in atelet or else race on process-wide chdir. Thinking about it more, maybe we want to make the symlink the shortened path and use that just for socket binding. |
| @@ -41,6 +37,33 @@ func RunSCBinaryPath(sha256 string) string { | |||
| } | |||
|
|
|||
| func AteomPath(ateomNamespace, ateomName string) string { | |||
There was a problem hiding this comment.
Can we use the pod UID for the ateom path? That will always fit in the correct length, and is reasonably discoverable.
There was a problem hiding this comment.
I like it. Will update.
|
EDIT: Squashed down. The diff is a bit more involved ... but I think this is still better architecturally. |
ab51a4f to
978000d
Compare
Pod names alone can easily exceed the max length (253 > 107).
Add a symlink with the full pod name for debugging.
Follow-up #92
TODO: I'm not sure about the symlink. It's annoying mapping pod => hash(pod) otherwise though. We could put a file inside the directory with the pod name instead, but I think we should probably put the full pod name somewhere in the structure so it's easier to inspect these.